package XynLeen.GraduationProject.Activities;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import XynLeen.GraduationProject.R;

public class Activity_Invitation extends AppCompatActivity implements View.OnClickListener{

    private TextView mTvNavigation;
    private ImageButton mIbNavigation_back;
    private ImageButton mIbNavigation_add;
    private CardView card_1;
    private CardView card_2;
    private CardView card_3;
    private CardView card_4;
    private CardView card_5;
    private CardView card_6;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_invitation);

        inititems();
    }

    public void inititems(){
        mTvNavigation=findViewById(R.id.tv_navigation_label);
        mIbNavigation_back=findViewById(R.id.ib_navigation_back);
        mIbNavigation_add=findViewById(R.id.ib_navigation_add);
        card_1=findViewById(R.id.card_1);
        card_2=findViewById(R.id.card_2);
        card_3=findViewById(R.id.card_3);
        card_4=findViewById(R.id.card_4);
        card_5=findViewById(R.id.card_5);
        card_6=findViewById(R.id.card_6);

        mTvNavigation.setText("全部模板");
        mIbNavigation_back.setOnClickListener(this);
        mIbNavigation_add.setVisibility(View.INVISIBLE);
        card_1.setOnClickListener(this);
        card_2.setOnClickListener(this);
        card_3.setOnClickListener(this);
        card_4.setOnClickListener(this);
        card_5.setOnClickListener(this);
        card_6.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.ib_navigation_back:
                finish();
                break;
            case R.id.card_1:
                Intent intent1 = new Intent(this, Activity_Invitation_One.class);
                startActivity(intent1);
                finish();
                break;
            case R.id.card_2:
                Intent intent2 = new Intent(this, Activity_Invitation_Two.class);
                startActivity(intent2);
                finish();
                break;
            case R.id.card_3:
                Intent intent3 = new Intent(this, Activity_Invitation_Three.class);
                startActivity(intent3);
                finish();
                break;
            case R.id.card_4:
                Intent intent4 = new Intent(this, Activity_Invitation_Four.class);
                startActivity(intent4);
                finish();
                break;
            case R.id.card_5:
                Intent intent5 = new Intent(this, Activity_Invitation_Five.class);
                startActivity(intent5);
                finish();
                break;
            case R.id.card_6:
                Intent intent6 = new Intent(this, Activity_Invitation_Six.class);
                startActivity(intent6);
                finish();
                break;
        }
    }
}
